//应该是一道数学题，骗了一点分 pass 26.67
#include<math.h>
#include<iostream>
#include<stack>
#include<unordered_map>
using namespace std;
int main()
{
	unordered_map<int, int>m;
	int a, b, c;
	cin >> a >> b >> c;
	for (int x = sqrt(a); pow(x, 2) <= b; x++)
	{
		int y = ceil(sqrt(a));
		y = ceil(sqrt(y));
		y = ceil(sqrt(y));
		y = floor(pow(y, 2));
		for (; y <= b; y++)
		{
			if (abs(pow(x, 2) - pow(y, 3)) <= c)
			{
				m.insert(pair<int, int>(x, y));
			}
		}
	}
	cout << m.size();

}